package com.gylang.print.richtext;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.regex.Pattern;

/**
 * 标签
 *
 * @author gylang
 * data 2021/7/9
 */
@Getter
@AllArgsConstructor
public enum TagPattern {
	/**
	 * 标签正则判断
	 */
	H("h", Pattern.compile("h\\d"), "标题"),

	B("b", Pattern.compile("b"), "粗体"),

	FONT("font", Pattern.compile("font"), "字体/字体颜色"),

	I("i", Pattern.compile("i"), "斜体"),

	U("u", Pattern.compile("u"), "下划线"),

	SPAN("span", Pattern.compile("span"), "行"),

	STRIKE("strike", Pattern.compile("strike"), "删除线"),

	TABLE("table", Pattern.compile("table"), "表格"),

	TBODY("tbody", Pattern.compile("tbody"), "表格主体"),

	TR("tr", Pattern.compile("tr"), "表格 - 行"),

	TH("th", Pattern.compile("th"), "表格 - 列头"),

	TD("td", Pattern.compile("td"), "表格 - 列数据"),


	;
	private final String name;

	private final Pattern regex;

	private final String remark;

}
